package com.freesky.web.manager.remote.search;


import com.freesky.common.dao.entity.SearchExpandLexcion;
import com.freesky.common.pojo.DataTablesResult;
import com.freesky.common.utils.reponse.JSONResponse;
import com.freesky.web.manager.remote.search.fallback.ExpandLexiconRemoteFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "emall-provider-zuul", fallback = ExpandLexiconRemoteFallback.class)
public interface ExpandLexiconRemote {
    String ZUUL_URL_PREFIX = "/mysevice/search";
    @GetMapping(value = ZUUL_URL_PREFIX + "/search/expand-lexicon/list")
    DataTablesResult getList();

    @PostMapping(value = ZUUL_URL_PREFIX+"/search/expand-lexicon/add")
    JSONResponse add(@RequestBody SearchExpandLexcion searchExpandLexcion);

    @DeleteMapping(value = ZUUL_URL_PREFIX+"/search/expand-lexicon/del/{ids}")
    JSONResponse deleteById(@PathVariable(value = "ids")Integer[] ids);
}
